feat: add Stainless SDK config and misc cleanups#132
Conversation
This was referenced Jan 24, 2026
Merged
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Greptile OverviewGreptile SummaryThis PR adds Stainless SDK configuration for generating TypeScript and Kotlin SDKs from the Grid API OpenAPI specification. The changes include SDK generation configuration, error handling improvements, and several bug fixes. Major changes:
All changes are clean, well-structured, and properly integrated with the existing OpenAPI schema architecture. Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| .stainless/stainless.yml | New Stainless SDK configuration file for TypeScript and Kotlin SDK generation with proper resource mapping and authentication settings |
| .stainless/workspace.json | New workspace configuration pointing to mintlify/openapi.yaml as the source spec |
| openapi/openapi.yaml | Added AllErrors union schema for SDK error handling configuration |
| openapi/paths/internal-accounts/internal_accounts.yaml | Fixed InternalAccount schema reference path from users/ to customers/ directory |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant Stainless as Stainless SDK Generator
participant OpenAPI as OpenAPI Spec
participant SDK as Generated SDK
participant API as Grid API
Note over Dev,Stainless: SDK Configuration Phase
Dev->>Stainless: Configure stainless.yml<br/>(resources, auth, pagination)
Dev->>Stainless: Configure workspace.json<br/>(points to mintlify/openapi.yaml)
Note over Stainless,OpenAPI: Schema Processing Phase
Stainless->>OpenAPI: Read mintlify/openapi.yaml
OpenAPI-->>Stainless: AllErrors union schema<br/>(Error400-501)
OpenAPI-->>Stainless: GridError base schema
Stainless->>Stainless: Transform AllErrors via<br/>splitSchemasByEnumProperty
Note over Stainless,SDK: SDK Generation Phase
Stainless->>SDK: Generate TypeScript SDK<br/>(grid package)
Stainless->>SDK: Generate Kotlin SDK<br/>(com.grid.api)
Note over SDK,API: Runtime Usage
Dev->>SDK: Use generated client<br/>(BasicAuth credentials)
SDK->>API: Make API request
API-->>SDK: Error response (400-500)
SDK->>SDK: Map to typed error<br/>(using discriminator: code)
SDK-->>Dev: Typed GridError subclass
6432728 to
e5749d2
Compare
21d334e to
f90918a
Compare
e5749d2 to
a27f6e6
Compare
f90918a to
c6b215b
Compare
a27f6e6 to
a1379cd
Compare
c6b215b to
6464d8a
Compare
a1379cd to
d0f0475
Compare
2d0527c to
16c31c5
Compare
94a379a to
c72b46f
Compare
16c31c5 to
20ea4a3
Compare
c72b46f to
99a29c9
Compare
20ea4a3 to
d1566ae
Compare
99a29c9 to
d8d7c4d
Compare
7324f44 to
3aa1250
Compare
1c31c37 to
fbf418e
Compare
3aa1250 to
f054ac0
Compare
fbf418e to
48e70c8
Compare
f054ac0 to
2ac3b42
Compare
- Add .stainless/stainless.yml and workspace.json - Add AllErrors schema and remove retry quotes endpoint - Update .redocly.lint-ignore.yaml - Fix UltimateBeneficialOwner phone format - Fix internal_accounts ref path
2ac3b42 to
a8f4844
Compare
48e70c8 to
00ab46b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Grid API SDK Configuration